<?php

namespace app\popo\vo;

use app\popo\BaseVO;

/**
 * 订单概览VO
 */
class OrderOverViewVO extends BaseVO
{
    /**
     * 待接单数量
     */
    public int $waitingOrders;

    /**
     * 待派送数量
     */
    public int $deliveredOrders;

    /**
     * 已完成数量
     */
    public int $completedOrders;

    /**
     * 已取消数量
     */
    public int $cancelledOrders;

    /**
     * 全部订单
     */
    public int $allOrders;

    public function getWaitingOrders(): int
    {
        return $this->waitingOrders ?? 0;
    }

    public function setWaitingOrders(int $waitingOrders): void
    {
        $this->waitingOrders = $waitingOrders;
    }

    public function getDeliveredOrders(): int
    {
        return $this->deliveredOrders ?? 0;
    }

    public function setDeliveredOrders(int $deliveredOrders): void
    {
        $this->deliveredOrders = $deliveredOrders;
    }

    public function getCompletedOrders(): int
    {
        return $this->completedOrders ?? 0;
    }

    public function setCompletedOrders(int $completedOrders): void
    {
        $this->completedOrders = $completedOrders;
    }

    public function getCancelledOrders(): int
    {
        return $this->cancelledOrders ?? 0;
    }

    public function setCancelledOrders(int $cancelledOrders): void
    {
        $this->cancelledOrders = $cancelledOrders;
    }

    public function getAllOrders(): int
    {
        return $this->allOrders ?? 0;
    }

    public function setAllOrders(int $allOrders): void
    {
        $this->allOrders = $allOrders;
    }

    public function toArray(): array
    {
        return [
            'waitingOrders' => $this->waitingOrders ?? 0,
            'deliveredOrders' => $this->deliveredOrders ?? 0,
            'completedOrders' => $this->completedOrders ?? 0,
            'cancelledOrders' => $this->cancelledOrders ?? 0,
            'allOrders' => $this->allOrders ?? 0
        ];
    }
}